package com.jsgt.greekfire.common.http

import com.jsgt.greekfire.bean.*
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * author fhx
 * create time 2020/4/25 20:54
 **/
interface UserService {
    /**
     * 获取地址信息
     */
    @POST("getaccount")
    suspend fun getaccount(@Body params: RequestBody): AtrAccountInfoBean

    /**
     * 创建一笔转账Transaction
     */
    @POST("createtransaction")
    suspend fun transfer(@Body params: RequestBody): TransferResult


    //------------------------------------------------------------------------------------------------------------
    /**
     * 用户信息
     */
    @GET("api/user/info")
    suspend fun userInfo(): ResponseData<UserBean>

    /**
     * 最新公告
     */
    @POST("api/notice/first")
    suspend fun latestNotice(): ResponseData<List<MessageBean>>

    /**
     * 公告列表
     */
    @POST("api/notice")
    suspend fun noticeList(@Body params: RequestBody): ResponseData<List<MessageBean>>

    /**
     * 消息列表
     */
    @POST("api/gfcnotice/list")
    suspend fun messageList(): ResponseData<List<MessageBean>>

    /**
     * 消息详情
     */
    @GET("api/gfcnotice/info")
    suspend fun messageInfo(): ResponseData<MessageBean>

    /**
     * 发送短信
     */
    @GET("api/smsKaptcha?")
    suspend fun sendSMS(@Query("phone") phone: String, @Query("key") key: String): ResponseData<Any>

    /**
     * 矿池活动是否开启 0 未开启 1开启
     */
    @GET("api/sysEnable/pool")
    suspend fun  poolActiveIsStart():ResponseData<Any>


    /**
     * 创世区块是否开启 0 未开启 1开启
     */
    @GET("api/sysEnable/activity")
    suspend fun  genesisActiveIsStart():ResponseData<Any>;

    /**
     * 发送邮箱
     */
    @GET("api/emallKaptcha?")
    suspend fun sendEmail(
        @Query("email") email: String,
        @Query("key") key: String
    ): ResponseData<Any>

    /**
     * 验证短信码
     */
    @POST("api/validateSMSKaptcha")
    suspend fun checkSMSCode(@Body params: RequestBody): ResponseData<Any>

    /**
     * 验证邮箱
     */
    @POST("api/validateEmallKaptcha")
    suspend fun checkEmailCode(@Body params: RequestBody): ResponseData<Any>

    /**
     * 修改交易密码
     */
    @POST("api/gfcuserwallet/updatePayPassword")
    suspend fun updateTradingPwd(@Body params: RequestBody): ResponseData<Any>

    /**
     * 修改安全密码
     */
    @POST("api/gfcuserwallet/updateSecurityPassword")
    suspend fun updateSecurityPwd(@Body params: RequestBody): ResponseData<Any>

    /**
     * 计价货币列表
     */
    @GET("api/gfcvaluationcurrency/list")
    suspend fun valuationCoinList(): ResponseData<List<Any>>

    /**
     * 修改计价货币
     */
    @POST("api/gfcuserwallet/updatevaluationCurrencyId")
    suspend fun updateValuationCoin(@Body params: RequestBody): ResponseData<Any>

    /**
     * 绑定手机
     */
    @POST("api/user/updateMobile")
    suspend fun bindPhone(@Body params: RequestBody): ResponseData<Any>

    /**
     * 修改手机
     */
    @POST("api/user/editMobile")
    suspend fun modifyPhone(@Body params: RequestBody): ResponseData<Any>

    /**
     * 绑定邮箱
     */
    @POST("api/user/updateEmail")
    suspend fun bindEmail(@Body params: RequestBody): ResponseData<Any>

    /**
     * 修改邮箱
     */
    @POST("api/user/editEmail")
    suspend fun editEmail(@Body params: RequestBody): ResponseData<Any>

    /**
     * 转账激活
     */
    @POST("api/gfctransferactivation/transfer")
    suspend fun activityTransfer(@Body params: RequestBody): ResponseData<Any>

    /**
     * 确定激活
     */
    @POST("api/gfctransferactivation/activation")
    suspend fun activityTransfer2(@Body params: RequestBody): ResponseData<Any>

    /**
     * 确定激活列表
     */
    @POST("api/gfctransferactivation/list")
    suspend fun activityTransferList(): ResponseData<List<TransferBean>>

    /**
     * 查询币种价格
     */
    @POST("api/gfcmarket/getPrice")
    suspend fun getPrice(): ResponseData<GetPrice>

    /**
     * 查询持币
     */
    @POST("api/userperformance/info")
    suspend fun myCoinNumber(): ResponseData<MinerBean>

    /**
     * 全网总产出
     */
    @GET("api/userperformance/info/sumWarehouse")
    suspend fun totalCoinNumber(): ResponseData<String>

    /**
     * 矿池列表
     */
    @POST("api/userperformance/listPage")
    suspend fun coinPoolList(@Body params: RequestBody): ResponseData<ResultData<MinerBean>>

    /**
     * 地址簿列表
     */
    @POST("api/gfcaddressbook/queryListByUserId")
    suspend fun addressList(@Body params: RequestBody): ResponseData<List<AddressBean>>

    /**
     * 添加地址
     */
    @POST("api/gfcaddressbook/save")
    suspend fun addAddress(@Body params: RequestBody): ResponseData<Any>

    /**
     * 个人钱包地址
     */
    @POST("api/gfcuserwallet/getByUserId/{guid}")
    suspend fun walletAddress(@Path("guid") guid: String): ResponseData<Any>

    /**
     * 标记详情
     */
    @GET("api/gfcotcadvertise/markDetail/{assetId}")
    suspend fun markDetail(@Path("assetId") assetId: String): ResponseData<Any>

    /**
     * 币币账单列表
     */
//    @POST("api/gfcuserassetlog/queryListByUserId")
    @POST("api/gfcuserassetlog/userAssetLog")
    suspend fun assetsLogList(@Body params: RequestBody): ResponseData<List<BillBean>>

    /**
     * 充币记录
     */
    @POST("api/gfcuserassetlog/rechargeLog")
    suspend fun rechargeLogList(@Body params: RequestBody): ResponseData<List<BillBean>>

    /**
     * 提币记录
     */
    @POST("api/gfcwithdrawalorder/list")
    suspend fun withdrawRecord(@Body params: RequestBody): ResponseData<ResultData<BillBean>>

    /**
     * 资产列表
     */
    @GET("api/gfcuserasset/userAssetList")
    suspend fun userAssetList(): ResponseData<List<AssetsBean>>

    /**
     * 资产管理列表
     */
    @GET("api/gfcuserasset/list")
    suspend fun userAssetManageList(): ResponseData<List<AssetsBean>>

    /**
     * 矿池列表
     */
    @GET("api/userperformance/indexData")
    suspend fun poolData(): ResponseData<IncomeBean>

    /**
     * 版本更新
     */
    @GET("api/user/getAppVersion")
    suspend fun getAppVersion(): ResponseData<UpdateBean>

    /**
     * 版本更新
     */
    @POST("api/logout")
    suspend fun logout(): ResponseData<Any>
}